package com.example.wemedia.controller;
import com.example.model.wemedia.pojo.NewsMaterial;
import com.example.wemedia.service.NewsMaterialService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Tag(name = "NewsMaterial")
@RestController
@RequestMapping("newsMaterial")
public class NewsMaterialController  {
    @Autowired
    private NewsMaterialService newsMaterialService;

    /*@GetMapping("/getInfo/{id}")
    @Operation(summary = "按照ID编号查看")
    public ResultBean<NewsMaterial> selectOne(@PathVariable Serializable id) {
        return ResultBean.success(this.newsMaterialService.getById(id));
    }

    @PostMapping("/save")
    @Operation(summary = "增加NewsMaterial")
    public ResultBean insert(@RequestBody NewsMaterial newsMaterial) {
        this.newsMaterialService.save(newsMaterial);
        return ResultBean.success();
    }

    @PutMapping("/update")
    @Operation(summary = "修改NewsMaterial")
    public ResultBean update(@RequestBody NewsMaterial newsMaterial) {
        this.newsMaterialService.updateById(newsMaterial);
        return ResultBean.success();
    }

    @DeleteMapping("/remove")
    @Operation(summary = "删除NewsMaterial")
    public ResultBean delete(@RequestParam("idList") List<Long> idList) {
        this.newsMaterialService.removeByIds(idList);
        return ResultBean.success();
    }*/
}

